perm filename MAILAP[ML,DWP] blob
sn#051888 filedate 1974-04-30 generic text, type T, neo UTF8
(LAP SEND SUBR) ~ (SEND <JOB>)
(JRST BEGIN:)
BOX: (0) (0) ~ 32-word (decimal) mailbox
(0) (0) (0) (0) (0) (0) (0) (0) (0) (0)
(0) (0) (0) (0) (0) (0) (0) (0) (0) (0)
(0) (0) (0) (0) (0) (0) (0) (0) (0) (0)
BEGIN: (CALL 1 (E SIXBIT)) ~ convert job name to sixbit
(MOVEM 1 JOB:)
(040000 1 (C 564155 0 455156)) ~ CALL 1,[SIXBIT /NAMEIN/] - does the job exist unambiguously?
(JRST 0 FAILED:) ~ no
(710000 0 JOB:) ~ SEND UUO
(JRST 0 FAILED:) ~ mail couldn't be sent
(MOVEI 1 (QUOTE T)) ~ successful return
(MOVEI 2 BOX:)
(JCALL 2 (E CLEAR_MAILBOX)) ~ zero the mailbox
FAILED: (MOVEI 1 (QUOTE NIL))
(MOVEI 2 BOX:)
(JCALL 2 (E CLEAR_MAILBOX)) ~ zero the mailbox
JOB: (0) ~ sixbit destination job name
(0 0 BOX:) ~ address of mailbox
NIL
(LAP FILL_MAILBOX SUBR) ~ (FILL_MAILBOX {T => SRCV, NIL => WRCV})
(JRST BEGIN:)
BOX: (0) (0) ~ 32-word (decimal) mailbox
(0) (0) (0) (0) (0) (0) (0) (0) (0) (0)
(0) (0) (0) (0) (0) (0) (0) (0) (0) (0)
(0) (0) (0) (0) (0) (0) (0) (0) (0) (0)
BEGIN: (MOVEI 2 BOX:)
(CALL 2 (E CLEAR_MAILBOX)) ~ zero the mailbox
(JUMPE 1 WRCV:) ~ use WRCV?
SRCV: (710000 2 BOX:) ~ SRCV UUO
(TDZA 1 1) ~ nothing in the mailbox
(MOVEI 1 (QUOTE T)) ~ successful return
(POPJ P)
WRCV: (710000 1 BOX:) ~ WRCV UUO
(MOVEI 1 (QUOTE T))
(POPJ P)
NIL
(LAP MAIL_IS_WAITING SUBR) ~ (MAIL_IS_WAITING <JOB>) or (MAIL_IS_WAITING @ME)
(CAIE 1 (QUOTE ME)) ~ are we checking our mailbox?
(JRST 0 HIM:) ~ no, another job's mailbox
(710000 3) ~ SKPME - check our mailbox
(JRST 0 NOMAIL:) ~ nothing in the mailbox
(JRST 0 MAIL:) ~ mail is waiting
HIM: (CALL 1 (E SIXBIT)) ~ convert job name to sixbit
(040000 1 (C 564155 0 455156)) ~ CALL 1,[SIXBIT /NAMEIN/] - does the job exist unambiguously?
(JRST 0 NOMAIL:) ~ no
(710000 4 1) ~ SKPHIM 1 - check the job's mailbox
NOMAIL: (TDZA 1 1) ~ nothing in the mailbox
MAIL: (MOVEI 1 (QUOTE T)) ~ mail is waiting for him
(POPJ P)
NIL
(LAP CLEAR_MAILBOX SUBR) ~ (CLEAR_MAILBOX <value> <actual core location>)
~ clears the 32-word mailbox beginning at the core location in acc 2; don't clobber acc 1
(402000 0 0 2) ~ SETZM (2) - zero the first mailbox location
(514000 3 2) ~ HRLZ 3,2
(271000 2 1) ~ ADDI 2,1
(540000 3 2) ~ HRR 3,2
(271000 2 30.) ~ ADDI 2,=30
BLT: (251000 3 0 2) ~ BLT 3,(2)
(POPJ P)
NIL
(LAP JOB_EXISTS SUBR) ~ (JOB_EXISTS <JOB>)
(CALL 1 (E SIXBIT)) ~ convert job name to sixbit
(040000 1 (C 564155 0 455156)) ~ CALL 1,[SIXBIT /NAMEIN/]
(TDZA 1 1) ~ job doesn't exist - return NIL
(MOVEI 1 (QUOTE T)) ~ job does exist - return T
(POPJ P)
NIL
(LAP SLEEP SUBR) ~ (SLEEP <integer>) <integer> ≤ 59
(275000 1 (QUOTE 0)) ~ SUBI 1,<LISP 0> - change from LISP to machine representation
(047000 1 31) ~ CALLI 1,SLEEP
(MOVEI 1 (QUOTE NIL))
(POPJ P)
NIL
(LAP SIXBIT SUBR) ~ (SIXBIT @ABCDEF)
~ Converts the print name of an atom into one word of six (or fewer) sixbit characters
(MOVEI 2 (QUOTE PNAME))
(CALL 2 (E GET)) ~ get the print name
(HLRZ@ 2 1) ~ pointer to the first ascii word
(MOVE 2 0 2) ~ the ascii itself
(MOVEI 3 0)
(HRRZ@ 1 1) ~ cdr of the print-name list
(JUMPE 1 START:) ~ only one word in the print name?
(HLRZ@ 3 1) ~ no
(MOVE 3 0 3)
(MOVEI 1 0) ~ clear acc 1 for the sixbit
START: (MOVEI 4 6) ~ Maximum number of characters to be converted (6)
(MOVE 5 (C 440700 0 2)) ~ Byte pointers: POINT 7,2
(MOVEM 5 FROM:)
(MOVE 5 (C 440600 0 1)) ~ POINT 6,1
(MOVEM 5 TO:)
LOOP: (134000 5 FROM:) ~ ILDP - get ascii character
(JUMPE 5 END:) ~ Null character?
(275000 5 40) ~ SUBI - make it sixbit
(136000 5 TO:) ~ IDBP - put it away
(367000 4 LOOP:) ~ SOJG - get the next character
END: (POPJ P)
FROM: (0)
TO: (0)
NIL